<?php

namespace Sifast\ProjectBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Role
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Sifast\ProjectBundle\Entity\RoleRepository")
 */
class Role
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="libelle_role", type="string", length=255)
     */
    private $libelleRole;

    /**
     * @var string
     *
     * @ORM\Column(name="date_debut", type="string", length=255)
     */
    private $dateDebut;

    /**
     * @var string
     *
     * @ORM\Column(name="date_fin", type="string", length=255)
     */
    private $dateFin;

    /**
    * @var Profil
    * @ORM\ManyToMany(targetEntity="Profil", inversedBy="Role")
    * @ORM\JoinTable(name="id_profil")
    */
    private $idProfil;
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set libelleRole
     *
     * @param string $libelleRole
     * @return Role
     */
    public function setLibelleRole($libelleRole)
    {
        $this->libelleRole = $libelleRole;
    
        return $this;
    }

    /**
     * Get libelleRole
     *
     * @return string 
     */
    public function getLibelleRole()
    {
        return $this->libelleRole;
    }

    /**
     * Set dateDebut
     *
     * @param string $dateDebut
     * @return Role
     */
    public function setDateDebut($dateDebut)
    {
        $this->dateDebut = $dateDebut;
    
        return $this;
    }

    /**
     * Get dateDebut
     *
     * @return string 
     */
    public function getDateDebut()
    {
        return $this->dateDebut;
    }

    /**
     * Set dateFin
     *
     * @param string $dateFin
     * @return Role
     */
    public function setDateFin($dateFin)
    {
        $this->dateFin = $dateFin;
    
        return $this;
    }

    /**
     * Get dateFin
     *
     * @return string 
     */
    public function getDateFin()
    {
        return $this->dateFin;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->idProfil = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add idProfil
     *
     * @param \Sifast\ProjectBundle\Entity\Profil $idProfil
     * @return Role
     */
    public function addIdProfil(\Sifast\ProjectBundle\Entity\Profil $idProfil)
    {
        $this->idProfil[] = $idProfil;
    
        return $this;
    }

    /**
     * Remove idProfil
     *
     * @param \Sifast\ProjectBundle\Entity\Profil $idProfil
     */
    public function removeIdProfil(\Sifast\ProjectBundle\Entity\Profil $idProfil)
    {
        $this->idProfil->removeElement($idProfil);
    }

    /**
     * Get idProfil
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getIdProfil()
    {
        return $this->idProfil;
    }
}